package com.sdy.po;

import java.math.BigDecimal;

public class OrderItem {

    private Integer id;           //id
    private Integer orderId;      //对应订单的id
    private Integer productId;    //产品id
    private Integer number;       //数量
    private Integer discount;  //折扣
    private Integer state;         //状态
    private Integer specificationId;   //商品规格id
    private BigDecimal price;
    private Product product;      //产品

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", productId=" + productId +
                ", number=" + number +
                ", discount=" + discount +
                ", state=" + state +
                ", specificationId=" + specificationId +
                ", price=" + price +
                ", product=" + product +
                '}';
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public OrderItem(Integer id, Integer orderId, Integer productId, Integer number, Integer discount, Integer state, Integer specificationId, BigDecimal price, Product product) {
        this.id = id;
        this.orderId = orderId;
        this.productId = productId;
        this.number = number;
        this.discount = discount;
        this.state = state;
        this.specificationId = specificationId;
        this.price = price;
        this.product = product;
    }

    public OrderItem(Integer orderId, Integer productId, Integer number, Integer discount, Integer state, Integer specificationId) {
        this.orderId = orderId;
        this.productId = productId;
        this.number = number;
        this.discount = discount;
        this.state = state;
        this.specificationId = specificationId;
    }

    public OrderItem() {
    }

    public OrderItem(Integer id, Integer orderId, Integer productId, Integer number, Integer discount, Integer state, Product product) {
        this.id = id;
        this.orderId = orderId;
        this.productId = productId;
        this.number = number;
        this.discount = discount;
        this.state = state;
        this.product = product;
    }

    public Integer getSpecificationId() {
        return specificationId;
    }

    public void setSpecificationId(Integer specificationId) {
        this.specificationId = specificationId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Integer getDiscount() {
        return discount;
    }

    public void setDiscount(Integer discount) {
        this.discount = discount;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

}
